package cc.wanforme.chipmunity.system.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cc.wanforme.chipmunity.common.bean.WebResponse;
import cc.wanforme.chipmunity.system.mapper.MessageMapper;
import cc.wanforme.chipmunity.system.po.Message;
import cc.wanforme.chipmunity.system.service.interfaces.MessageService;

/**
 * @author wanne
 * 2019年8月18日
 * 
 */
@Service
public class MessageServiceImpl implements MessageService{

	@Autowired
	private MessageMapper messageMapper;
	
	@Override
	public WebResponse updateMessage(Message message) {
		if(message.getId()==null) {
			return WebResponse.fail("未知消息");
		}
		
		messageMapper.updateMessage(message);
		return WebResponse.success("更新成功");
	}
	
	
	
}
